package com.wtwd.device.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wtwd.device.model.entity.Step;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 每日步数 Mapper 接口
 * </p>
 *
 * @author zdl
 * @since 2021-08-31
 */
@Mapper
public interface StepMapper extends BaseMapper<Step> {

    Integer clearStepByDate(String date);

    List<Map<String, Object>> getStepInfoByUserIdList(@Param("list") ArrayList<Long> friendIdList,@Param("time") String yestTime);

    Step getStepInfoByDeviceIdAndTime(@Param("id") Long id,@Param("time") String time);

    Step getDayMaxStepByDeviceId(@Param("deviceId") Long deviceId);

    Integer getTotalStepByDeviceId(@Param("id") Long id);

    Integer deleteStepByDeviceId(@Param("id") Long id);
}
